package org.bdware.doip.core.codec;

import org.bdware.doip.core.exception.DoDecodeException;
import org.bdware.doip.core.model.digitalObject.DigitalObject;

import java.io.IOException;
import java.util.ArrayList;

public interface DigitalObjectCodec {
    byte[] DoToByteArray(DigitalObject digitalObject);
    DigitalObject ByteArrayToDo(byte[] doBytes) throws IOException, DoDecodeException;

    ArrayList<byte[]> DoToSegments(DigitalObject digitalObject);
    DigitalObject SegmentsToDo(ArrayList<byte[]> segments) throws DoDecodeException;
}
